<?php
$parentCaption = BUtils::T('profile_lbl');
$caption = BUtils::T('account_lbl');
$this->pageTitle = $parentCaption;

$this->breadcrumbs = array(
	$parentCaption => array('index'),
	$caption,
);
?>
<div class="page-header position-relative">
	<h1>
		<?php echo $parentCaption; ?>
		<small>
			<i class="icon-double-angle-right"></i>
			<?php echo $caption; ?>
		</small>
	</h1>
</div><!--/.page-header-->

<div class="row-fluid">
	<!-- Message -->
<?php if (false) { ?>
	<div class="alert alert-block alert-success">
		<button type="button" class="close" data-dismiss="alert">
			<i class="icon-remove"></i>
		</button>
		<i class="icon-info-sign green"></i>
		Please keep your account information safe.
	</div>
<?php } elseif (false) { ?>
	<div class="alert alert-block alert-error">
		<button type="button" class="close" data-dismiss="alert">
			<i class="icon-remove"></i>
		</button>
		<i class="icon-info-sign"></i>
		Please use your own email for our latest news, offers and notifications.
	</div>
<?php } ?>
	<div class="space-6"></div>
	
	<div class="row-fluid">
		<div class="span5 offset1">
			<div class="widget-box transparent">
				<div class="widget-header">
					<h4 class="lighter">
						<i class="icon-lock blue"></i> <?php echo 'Change your password'; ?>
					</h4>
				</div>
				<div class="widget-body">
					<div class="widget-main">
<div class="biz-form">
<?php $form = $this->beginWidget('CActiveForm', array(
	'id'=>'merchant-form-password',
	'enableClientValidation'=>true,
	'clientOptions'=>array(
		'validateOnSubmit'=>true,
	),
)); ?>
<div class="fieldswrap">
	<?php if (Yii::app()->user->hasFlash('password')) { ?>
	<div class="alert alert-block alert-success">
		<i class="icon-ok"></i>
		<?php echo Yii::app()->user->getFlash('password'); ?>
	</div>
	<?php } ?>
	<?php if (Yii::app()->user->hasFlash('password_failed')) { ?>
	<div class="alert alert-block alert-error">
		<i class="icon-remove"></i>
		<?php echo Yii::app()->user->getFlash('password_failed'); ?>
	</div>
	<?php } ?>
	<div class="fields">
		<?php echo $form->labelEx($model_password,'new_password'); ?>
		<div class="controls clearfix">
			<span class="input-icon input-icon-right span12">
				<?php echo $form->passwordField($model_password,'new_password',array('class'=>'span12')); ?>
				<i class="icon-lock"></i>
			</span>
			<?php echo $form->error($model_password,'new_password'); ?>
		</div>
		<?php echo $form->labelEx($model_password,'new_password_repeat'); ?>
		<div class="controls clearfix">
			<span class="input-icon input-icon-right span12">
				<?php echo $form->passwordField($model_password,'new_password_repeat',array('class'=>'span12')); ?>
				<i class="icon-lock"></i>
			</span>
			<?php echo $form->error($model_password,'new_password_repeat'); ?>
		</div>
	</div>
</div>
<div class="margin actions">
	<?php echo CHtml::submitButton(BUtils::T('save_changes_btn'), array('class' => 'btn btn-large btn-primary')); ?>
</div>
<?php $this->endWidget(); ?>
</div>
					</div><!-- end widget-main -->
				</div>
			</div>
		</div><!-- end left side -->
		
		<div class="span5">
			<div class="widget-box transparent">
				<div class="widget-header">
					<h4 class="lighter">
						<i class="icon-edit blue"></i> <?php echo 'Reset email address'; ?>
					</h4>
				</div>
				<div class="widget-body">
					<div class="widget-main">
<div class="biz-form">
<?php $form = $this->beginWidget('CActiveForm', array(
	'id'=>'merchant-form-email',
	'enableClientValidation'=>true,
	'clientOptions'=>array(
		'validateOnSubmit'=>true,
	),
)); ?>
<div class="fieldswrap">
	<?php if (Yii::app()->user->hasFlash('email')) { ?>
	<div class="alert alert-block alert-success">
		<i class="icon-ok"></i>
		<?php echo Yii::app()->user->getFlash('email'); ?>
	</div>
	<?php } ?>
	<?php if (Yii::app()->user->hasFlash('email_failed')) { ?>
	<div class="alert alert-block alert-error">
		<i class="icon-remove"></i>
		<?php echo Yii::app()->user->getFlash('email_failed'); ?>
	</div>
	<?php } ?>
	<div class="fields">
		<?php echo $form->labelEx($model_email,'email'); ?>
		<div class="controls clearfix">
			<span class="input-icon input-icon-right span12">
				<?php echo $form->textField($model_email,'email', array('readonly'=>'readonly', 'class'=>'span12')); ?>
				<i class="icon-envelope"></i>
			</span>
		</div>
		<?php echo $form->labelEx($model_email,'password'); ?>
		<div class="controls clearfix">
			<span class="input-icon input-icon-right span12">
				<?php echo $form->passwordField($model_email,'password', array('value'=>'', 'class'=>'span12')); ?>
				<i class="icon-lock"></i>
			</span>
			<?php echo $form->error($model_email,'password'); ?>
		</div>
		<?php echo $form->labelEx($model_email,'new_email'); ?>
		<div class="controls clearfix">
			<span class="input-icon input-icon-right span12">
				<?php echo $form->textField($model_email,'new_email', array('class'=>'span12')); ?>
				<i class="icon-envelope-alt"></i>
			</span>
			<?php echo $form->error($model_email,'new_email'); ?>
		</div>
	</div>
</div>
<div class="margin actions">
	<?php echo CHtml::submitButton(BUtils::T('save_changes_btn'), array('class' => 'btn btn-large btn-primary')); ?>
</div>
<?php $this->endWidget(); ?>
</div>
					</div><!-- end widget-main -->
				</div>
			</div>
		</div><!-- end left side -->
	</div>
</div>

<script>
$(function() {	
	
});
</script>